package com.wang.scacodetest.bean;

import lombok.Data;

@Data
public class Ajax {
    private String message;
    private Object data;
    private Integer code;
    public Ajax(Integer code,String message){
        this.code=code;
        this.message=message;
    }

    public Ajax(Integer code,String message,Object data){
        this.code=code;
        this.message=message;
        this.data=data;
    }

    public static Ajax success(String message){
        Ajax ajax=new Ajax(200,message);
        return ajax;
    }

    public static Ajax success(String message,Object data){
        Ajax ajax=new Ajax(200,message,data);
        return ajax;
    }
}
